package com.baeldung.bidirect;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

/**
 * Created by dzy on 2018/9/1
 */
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property = "id")
public class Item2 {
  public int id;
  public String itemName;

  public User2 owner;

  public Item2(int id, String itemName, User2 user) {
    this.id=id;
    this.itemName = itemName;
    this.owner = user;
  }
}
